using System;
using System.Collections.Generic;
using System.Text;

namespace GoogleCalendarReminder
{
    /// <summary>
    /// A class which wraps a Google.GData.Extensions.Reminder object and provides
    /// a more user friendly interface.
    /// </summary>
    public class ReminderWrapper
    {
        #region Private Data Members

        private Google.GData.Extensions.Reminder _reminder;

        #endregion

        #region Constructors

        /// <summary>
        /// Creates a new instance of the GoogleCalendarReminder.ReminderWrapper class.
        /// </summary>
        /// <param name="reminder">The reminder to wrap.</param>
        /// <exception cref="System.ArgumentNullException">Arguments can't be null.</exception>
        public ReminderWrapper(Google.GData.Extensions.Reminder reminder)
        {
            if (reminder == null)
                throw new ArgumentNullException("Arguments can't be null.");

            _reminder = reminder;
        }

        #endregion

        #region Public Properties

        /// <summary>
        /// Gets the reminder method.
        /// </summary>
        public string Method
        {
            get
            {
                switch (_reminder.Method)
                {
                    case Google.GData.Extensions.Reminder.ReminderMethod.alert:
                        return ReminderMethods.Alert.ToString();
                    //case Google.GData.Extensions.Reminder.ReminderMethod.all:
                    //    return ReminderMethods.All.ToString();
                    case Google.GData.Extensions.Reminder.ReminderMethod.email:
                        return ReminderMethods.Email.ToString();
                    //case Google.GData.Extensions.Reminder.ReminderMethod.none:
                    //    return ReminderMethods.None.ToString();
                    case Google.GData.Extensions.Reminder.ReminderMethod.sms:
                        return ReminderMethods.Sms.ToString();
                    //case Google.GData.Extensions.Reminder.ReminderMethod.unspecified:
                    default:
                        return ReminderMethods.Sms.ToString();
                }
            }
        }

        /// <summary>
        /// Gets the minutes.
        /// </summary>
        public int Minutes
        {
            get { return _reminder.Minutes; }
        }

        #endregion
    }
}
